import request from '@/utils/request'

// api地址
const api = {
  userBooking: '/mxty/User/myBooking',
  list: '/mxty/arena/list',
  parts: '/mxty/arena/parts',
  book: '/mxty/arena/book',
  codeToken: '/mxty/arena/codeToken',
  checkBooking: '/mxty/arena/checkBooking',
  present: '/mxty/arena/present',
  refund: '/mxty/User/refund',
  booktime: '/mxty/arena/booktime',
}


export const booktime = (param) => {
  return request.get(api.booktime, param)
}

// 获取会员用户预订的场次
export const userBooking = (param) => {
  return request.get(api.userBooking, param)
}

//退款
export const refund = (param) => {
  return request.get(api.refund, param)
}

// 获取所有可预约的场地信息
export const list = (param) => {
  return request.get(api.list, param)
}

// 获取所有可预约的场地信息
export const parts = (param) => {
  return request.get(api.parts, param)
}

// 预订场次
export const book = (param) => {
  return request.get(api.book, param)
}

// 获取订场二维码token
export const codeToken = (param) => {
  return request.get(api.codeToken, param)
}

// 检查订场二维码信息
export const checkBooking = (param) => {
  return request.get(api.checkBooking, param)
}

// 确认订场用户到场
export const present = (param) => {
  return request.get(api.present, param)
}